home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / bbs / SigmaX40.lha / SampleBBS / Bonus / STRUCT.LHA / express.h next >
C/C++ Source or Header  |  1996-07-16  |  13KB  |  494 lines

  1. #define SUCCESS 0
  2. #define PRIVATE 10
  3. #define LCFILES 9
  4. #define FAILURE -1
  5. #define NOTALLOWED 1
  6. #define NOTTESTED  2
  7. #define ABORT    -2 
  8. #define HISTORY 999
  9. #define MAXHIST 20
  10.  
  11. #define NOSCREENS 0
  12. #define BBSSCREENS 1
  13. #define NODESCREENS 2
  14.  
  15. #define KEYBOARD_TIMEOUT 300L
  16.  
  17. #ifndef FOREVER
  18. #       define FOREVER for(;;)
  19. #endif
  20.  
  21. #define FALSE 0
  22. #define TRUE  1
  23.  
  24. #define AWAIT_LOGON     0
  25. #define SYSOP_LOGON     1
  26. #define LOCAL_LOGON     2
  27. #define REMOTE_LOGON    3
  28. #define GOODBYE_LOGON   4
  29. #define SUSPEND_LOGON   5
  30.  
  31. #define STANDARD_LOGOFF 1
  32. #define SLEEP_LOGOFF    2
  33. #define OVERTIME_LOGOFF 3
  34. #define CARRIER_LOGOFF  4
  35. #define ILLEGAL_LOGOFF  5
  36.  
  37. #define ENV_IDLE        0
  38. #define ENV_DOWNLOADING 1
  39. #define ENV_UPLOADING   2
  40. #define ENV_DOORS       3
  41. #define ENV_MAIL        4
  42. #define ENV_STATS       5
  43. #define ENV_ACCOUNT     6
  44. #define ENV_ZOOM        7
  45. #define ENV_FILES       8
  46. #define ENV_BULLETINS   9
  47. #define ENV_VIEWING     10
  48. #define ENV_ACCOUNTSEQ  11
  49. #define ENV_LOGOFF      12
  50. #define ENV_SYSOP       13
  51. #define ENV_SHELL       14
  52. #define ENV_EMACS       15
  53. #define ENV_JOIN        16
  54. #define ENV_CHAT        17
  55. #define ENV_NOTACTIVE   18
  56. #define ENV_REQ_CHAT    19
  57. #define ENV_CONNECT     20
  58. #define ENV_LOGGINGON   21
  59. #define ENV_AWAITCONNECT 22
  60. #define ENV_SCANNING     23
  61. #define ENV_SHUTDOWN     24
  62. #define ENV_MULTICHAT    25
  63. #define ENV_SUSPEND      26
  64. #define ENV_RESERVE      27
  65. #define ENV_OLM          28
  66. #define ENV_FLAGFILES    29
  67. #define ENV_HYDRALINK    30
  68. #define ENV_RINGDETECT   31
  69. #define ENV_SMODEM       32
  70.  
  71. #define SV_SYSOPLOG       154
  72. #define SV_LOCALLOG       155
  73. #define SV_ACCOUNTS       156
  74. #define SV_CHAT           157
  75. #define SV_NODEOFFHOOK    158
  76. #define SV_EXITNODE       159
  77. #define SV_INITMODEM      160
  78. #define SV_WHATSUP        161
  79. #define RESERVED_BLOCK10  162
  80. #define SV_INSTANT        170
  81. #define SV_RESERVE        171
  82. #define SV_CHATTOGGLE     172
  83. #define SV_AESHELL        174
  84. #define SV_CLIPBOARD      175
  85. #define SV_START          176
  86. #define SV_NEWMSG         177
  87. #define SV_QUIETNODE      178
  88. #define SV_SETNRAMS       179
  89. #define SV_RESERVENODE    180
  90. #define SV_MSGCPS         181//add this one
  91.  
  92. #define WAIT     600
  93. #define NOWAIT   FALSE
  94. #define YES      TRUE
  95. #define NO       FALSE
  96. #define ECHO     TRUE
  97. #define NOECHO   FALSE
  98. #define CSI      0x9B
  99. #define RIGHTARROW 2
  100. #define LEFTARROW 3
  101. #define UPARROW 4
  102. #define DOWNARROW 5
  103.  
  104. #define IOFLAG_FIL_IN   0
  105. #define IOFLAG_KBD_IN   1
  106. #define IOFLAG_SER_IN   2
  107. #define IOFLAG_FIL_OUT  3
  108. #define IOFLAG_PRT_OUT  4
  109. #define IOFLAG_SCR_OUT  5
  110. #define IOFLAG_SER_OUT  6
  111.  
  112. #define TIMEOUT  -3
  113. #define NO_CARRIER -4
  114. #define GOODBYE  -7
  115. #define EXITCHAT  -8
  116.  
  117. #define STAT_STARTUP    0
  118. #define STAT_LOGON      1
  119. #define STAT_LOGOFF     2
  120. #define STAT_GUEST_CALL 3
  121. #define STAT_NEW_CALL   4
  122. #define STAT_VALID_CALL 5
  123. #define STAT_MESSAGE    6
  124. #define STAT_LETTER     7
  125. #define STAT_UPLOAD     8
  126. #define STAT_DOWNLOAD   9
  127. #define STAT_NEW_MEMBER 10
  128. #define STAT_SHUTDOWN   11
  129.  
  130. ///ZModem Struct
  131. struct ZModem {
  132.  char    FileName[40], TitleBar[60], ZStat[60];
  133.  long    Filesize, Cps,  Eff, RecPos, ErrorPos, ResumePos;
  134.  ULONG   ApxTime, LastTime;
  135.  char    Pad[2];
  136. };
  137. ///
  138. /// TempSysopInfo
  139. struct TempSysopInfo {
  140.         UWORD           AccessLevel;
  141.         UWORD           RatioType;
  142.         UWORD           Ratio;
  143.         LONG            TimeTotal;
  144.         UBYTE           ConfAc[10];
  145.         };
  146. ///
  147. /// Struct for User.Data!
  148. struct User {
  149.  char    Name[31],Pass[9],Location[30],PhoneNumber[13];
  150.  USHORT  Slot_Number;
  151.  USHORT  Sec_Status,
  152.          Sec_Board,                   /* File or Byte Ratio */
  153.          Sec_Library,                 /* Ratio              */
  154.          Sec_Bulletin,                /* Computer Type      */
  155.          Messages_Posted; /* Note ConfYM = the last msg you actually read, ConfRead is the same ?? */
  156.  ULONG   NewSinceDate;
  157.  char    ConfRead1[4];
  158.  ULONG     ConfRead2, ConfRead3, ConfRead4, ConfRead5,  ConfRead6,
  159.          ConfRead7;
  160.  ULONG   ConfRead8, ConfRead9;
  161.  char    Conference_Access[10];
  162.  USHORT  Uploads, Downloads, ConfRJoin, Times_Called;
  163.  long    Time_Last_On, Time_Used, Time_Limit, Time_Total;
  164.  ULONG   Bytes_Download,
  165.      Bytes_Upload,
  166.      Daily_Bytes_Limit,
  167.      Daily_Bytes_Dld;
  168.  char    Expert;
  169.  double  NBytes_Download,
  170.      NBytes_Upload,
  171.      NDaily_Bytes_Limit,
  172.      NDaily_Bytes_Dld;
  173. /*
  174.  ULONG     ConfYM5,
  175.      ConfYM6,
  176.      ConfYM7,
  177.          ConfYM8;
  178. */
  179.  UBYTE   Flag1, Flag2, FLag3, EditorType;
  180.  long    BeginLogCall;
  181.  UBYTE   Protocol, UUCPA, LineLength, New_User;
  182.  }; // UUCPA == AnsiUserFlag!
  183. ///
  184. /// Struct for User.keys!
  185. struct UserKeys {                 /* changes to UserKeys (RTS) */
  186.  char    UserName[31];
  187.  long    Number;
  188.  UBYTE   New_User;
  189.  UWORD   UPcps,              /* highest upload cps rate */
  190.          DNcps,              /* highest dnload cps rate */
  191.          Userflags,          /*                         */
  192.          baud_rate;          /* last online baud rate   */
  193.  UBYTE   QFlag,
  194.          Who,
  195.          MailScan,
  196.          Language,
  197.          QuietNode,
  198.          MaxCalls,
  199.          Called,
  200.          ReplySkip,
  201.      ConfAccounting;
  202. };
  203. ///
  204. ///Struct for MailHeader
  205. struct MailHeader {
  206.         char    Status[1];
  207.         long    MsgNumb;
  208.         char    ToName[31],
  209.                 FromName[31],
  210.                 Subject[31];
  211.         long    MsgDate,
  212.                 Recv;
  213.         UBYTE   Conference;
  214.         };
  215. ///
  216. ///Unused struct so far...
  217. struct FNodeStatus {
  218.         char    FileUpload[32];
  219.         char    FileDownload[32];
  220.  
  221.         long    FileUpSize;
  222.         long    FileUpCurr;
  223.         long    FileDSize;
  224.         long    FileDCurr;
  225.         
  226.         int     CPSUp;
  227.         int     CPSDl;
  228.         };
  229. ///
  230. ///Struct for MailStat File
  231. struct MailStat {
  232.         long    LowestKey,
  233.                 HighMsgNum,
  234.                 LowestNotDel;
  235.         char Pad[6];
  236.         };
  237. ///
  238. ///Struct for Conf.DB File
  239. struct ConfBase
  240. {
  241.   char Handle[31];
  242.   ULONG NewSinceDate, ConfRead,ConfYM;
  243.   ULONG Bytes_Download,Bytes_Upload;
  244.   ULONG Daily_Bytes_Limit,Daily_Bytes_Dld;
  245.   USHORT Upload,Downloads,RatioType,Ratio,Messages_Posted;
  246.   UWORD Access;
  247.   UWORD Active;
  248. };
  249. ///
  250. ///struct for soon to be coming user.misc file...
  251. struct UserMisc
  252. {
  253.   char Handle[31];    //maybe not used....
  254.   ULONG ConfAxx;    //not sure yet...
  255.   ULONG MiscInfo;    //Not sure yet...
  256.   char MsgSentBy[76];    //MAX 75 Chars +1 Pad
  257.   char SentBy[46];    //MAX 45 + 1 Pad
  258.   UBYTE ConfAccounting;
  259.   char  Pad[263];    //Just incase...
  260. };                  //Maybe used later on, not sure yet what i should
  261.                     //Put in here.... exactly 425 Bytes per User...
  262. ///
  263.  
  264. struct ConfCfg
  265. {
  266.  int  ConfNum;
  267.  char ConfName[100];
  268.  char ConfLoc[255];
  269.  char MsgLoc[255];
  270.  char Password[30];
  271.  BOOL SentBy;
  272.  BOOL MsgShared;
  273. };
  274.  
  275. ///erm... dunno .. some struct
  276. struct MyData
  277. {
  278.   int Type,Size,misc1,Version;
  279. };
  280. ///
  281. ///struct used for communicating with the ACP
  282. struct MasterData
  283. {
  284.    struct MyData   Code;
  285.    struct ConfBase Conf;
  286. };
  287. ///
  288.  
  289. /* Structure for the TOPCPS.DAT File */
  290.  
  291. struct topcps
  292. {
  293.     long    upCPS;
  294.     char    upNAME[40];
  295.     long    downCPS;
  296.     char    downNAME[40];
  297. };
  298.  
  299.  
  300. /* stupid defines , theres gotta be a better way , will have to 
  301.    consult the Lattice Manual */
  302.  
  303. #define AbortIO(x) AbortIO((struct IORequest *)x)
  304. #define CheckIO(x) CheckIO((struct IORequest *)x)
  305. #define WaitIO(x) WaitIO((struct IORequest *)x)
  306. #define SendIO(x) SendIO((struct IORequest *)x)
  307. #define DoIO(x) DoIO((struct IORequest *)x)
  308. #define BeginIO(x) BeginIO((struct IORequest *)x)
  309.  
  310. #define OpenDevice(a, b, c, d) OpenDevice(a, b, (struct IORequest *)c, d)
  311. #define CloseDevice(x) CloseDevice((struct IORequest *)x)
  312.  
  313. #define DeleteExtIO(x) DeleteExtIO((struct IORequest *)x)
  314.  
  315. #define Tell(x)  Seek(x,0L,OFFSET_CURRENT)
  316.  
  317. #undef PutStr
  318.  
  319. ///struct for the whole Config of the ACP...
  320. struct StartOption
  321. {
  322.   SHORT LeftEdge;
  323.   SHORT TopEdge;
  324.   SHORT Width;
  325.   SHORT Height;
  326.   int BitPlanes;
  327.   BOOL StatBar;
  328.   BOOL Interlace;
  329.   BOOL DupeCheck;
  330.   BOOL QLogon;
  331.   BOOL TakeCredits;
  332.   BOOL SeenIt;
  333.   BOOL TrapDoor;
  334.   BOOL Iconify;
  335.   BOOL Eall_level;
  336.   BOOL A2232;
  337.   BOOL Toggles[20];
  338.   char Logoff[80];
  339.   char ShutDown[80];
  340.   char CycleLock[80];
  341.   char RamPen[80];
  342.   char BBSConfig[80];
  343.   char FilesNot[80];
  344.   char UserData[80];
  345.   char UserKey[80];
  346.   char OffHook[80];
  347.   char NodeScreen[80];
  348.   APTR t;
  349.   APTR s;
  350.   char LocalPath[80],
  351.        TextPath[80];
  352.   int  RingCount;
  353. };
  354. ///
  355.  
  356. #define ACS_ACCOUNT_EDITING      0
  357. #define ACS_BULLETINS            1
  358. #define ACS_COMMENT_TO_SYSOP     2
  359. #define ACS_DOWNLOAD             3
  360. #define ACS_UPLOAD               4
  361. #define ACS_ENTER_MESSAGE        5
  362. #define ACS_FILE_LISTINGS        6
  363. #define ACS_JOIN_CONFERENCE      7
  364. #define ACS_NEW_FILES_SINCE      8
  365. #define ACS_PAGE_SYSOP           9
  366. #define ACS_READ_MSG             10
  367. #define ACS_REMOTE_SHELL         11
  368. #define ACS_DISPLAY_USER_STATS   12
  369. #define ACS_VIEW_A_FILE          13
  370. #define ACS_EDIT_USER_INFO       14
  371. #define ACS_EDIT_USER_NAME       15
  372. #define ACS_EDIT_USER_LOCATION   16
  373. #define ACS_EDIT_PHONE_NUMBER    17
  374. #define ACS_EDIT_PASSWORD        18
  375. #define ACS_ZIPPY_TEXT_SEARCH    19
  376. #define ACS_OVERRIDE_CHAT        20
  377. #define ACS_SYSOP_DOWNLOAD       21
  378. #define ACS_SYSOP_VIEW           22
  379. #define ACS_SYSOP_READ           23
  380. #define ACS_KEEP_UPLOAD_CREDIT   24
  381. #define ACS_OVERRIDE_TIMES       25
  382. #define ACS_CLEAR_SCREEN_MSG     26
  383. #define ACS_ALLOW_FREE_RESUMING  27
  384. #define ACS_ONE_TIME_BULLETINS   28
  385. #define ACS_DO_CALLERSLOG        29
  386. #define ACS_SENTBY_FILES         30
  387. #define ACS_DO_UD_LOG            31
  388. #define ACS_SCREEN_TO_FRONT      32
  389. #define ACS_DEFAULT_CHAT_ON      33
  390. #define ACS_EALL_LEVEL           34
  391. #define ACS_DUPE_FILECHECK       35
  392. #define ACS_MSG_EDIT             36
  393. #define ACS_NODE_LIST            37
  394. #define ACS_MSG_LEVEL            38
  395. #define ACS_MSG_EXPERATION       39
  396. #define ACS_DELETE_MSG           40
  397. #define ACS_ATTACH_FILES         41
  398. #define ACS_CUSTOMCOMMANDS       42
  399. #define ACS_JOIN_SUB_CONFERENCE  43
  400. #define ACS_ZOOM_MAIL            44
  401. #define ACS_MCI_MSG              45
  402. #define ACS_EDIT_DIRS            46
  403. #define ACS_EDIT_ANY             47
  404. #define ACS_BREAK_CHAT           48
  405. #define ACS_QUIET_NODE           49
  406. #define ACS_SYSOP_COMMANDS       50
  407. #define ACS_WHO_IS_ONLINE        51
  408. #define ACS_RELOGON              52
  409. #define ACS_ULSTATS              53
  410. #define ACS_XPR_RECEIVE          54
  411. #define ACS_XPR_SEND             55
  412. #define ACS_WILDCARDS            56
  413. #define ACS_CONFERENCE_ACCOUNTING 57
  414. #define ACS_PRI_MSGFILES         58
  415. #define ACS_PUB_MSGFILES         59
  416. #define ACS_DIR_IN_KBYTE         60
  417. #define ACS_STEALTH_MODE         61
  418. #define ACS_QUIET_NODEOK         62
  419. #define ACS_WHO_FILENAMES        63
  420.  
  421.  
  422. //#define ADD_BIT(x) newacs[x/16] |= ten[x%16]
  423. //#define REM_BIT(x) newacs[x/16] ^= ten[x%16]
  424. //#define GET_BIT(x) newacs[x/16] |  ten[x%16]
  425.  
  426. #define LVL_ACCOUNT_EDITING      0
  427. #define LVL_COMMENT_TO_SYSOP     1
  428. #define LVL_DOWNLOAD             2
  429. #define LVL_ENTER_MESSAGE        3
  430. #define LVL_FILE_LISTINGS        4
  431. #define LVL_JOIN_CONFERENCE      5
  432. #define LVL_NEW_FILES_SINCE      6
  433. #define LVL_PAGE_SYSOP           7
  434. #define LVL_READ_MSG             8
  435. #define LVL_DISPLAY_USER_STATS   9
  436. #define LVL_UPLOAD               10
  437. #define LVL_VIEW_A_FILE          11
  438. #define LVL_EDIT_USER_INFO       12
  439. #define LVL_REMOTE_SHELL         13
  440. #define LVL_ZIPPY_TEXT_SEARCH    14
  441. #define LVL_OVERRIDE_CHAT        15
  442. #define LVL_EDIT_USER_NAME       16
  443. #define LVL_EDIT_USER_LOCATION   17
  444. #define LVL_EDIT_PHONE_NUMBER    18
  445. #define LVL_EDIT_PASSWORD        19
  446. #define LVL_SENTBY_FILES         20
  447. #define LVL_DEFAULT_CHAT_ON      21
  448. #define LVL_CLEAR_SCREEN_MSG     22
  449. #define LVL_CAPITOLS_in_FILE     23
  450. #define LVL_CHAT_COLOR_SYSOP     24
  451. #define LVL_CHAT_COLOR_USER      25
  452. #define LVL_VARYING_LINK_RATE    26
  453. #define LVL_KEEP_UPLOAD_CREDIT   27
  454. #define LVL_ALLOW_FREE_RESUMING  28
  455. #define LVL_DO_CALLERSLOG        29
  456. #define LVL_DO_UD_LOG            30
  457. #define LVL_OVERRIDE_TIMES       41
  458. #define LVL_BULLETINS            42
  459. #define LVL_SYSOP_READ           43
  460. #define LVL_NODE_NUMBER          44
  461. #define LVL_SCREEN_TO_FRONT      45
  462. #define LVL_ZOO                  46
  463. #define LVL_PKAX                 47
  464. #define LVL_LHARC                48
  465. #define LVL_WARP                 49
  466. #define LVL_ZIP                  50
  467. #define LVL_WHO_IS_ONLINE        51
  468. #define LVL_WILDCARDS            56
  469. #define LVL_DIR_IN_KBYTE         60
  470. #define LVL_STEALTH_MODE         61
  471. #define LVL_QUIET_NODEOK         62
  472. #define LVL_WHO_FILENAMES        63
  473.  
  474. #define DEBUG_BEGIN             0
  475. #define DEBUG_DROPDTR           1
  476. #define DEBUG_AWAITING_CONNECT  2
  477. #define DEBUG_RESETING_NODE     3
  478. #define DEBUG_RESETING_MODEM    4
  479. #define DEBUG_MODEM_RESET       5
  480. #define DEBUG_CHECKING_SHUTDOWN 6
  481. #define DEBUG_CONNECT_TIMEOUT   7
  482. #define DEBUG_BAD_CONNECT       8
  483. #define DEBUG_SER_ROUTINES      9
  484. #define DEBUG_CON_ROUTINES     10
  485. #define DEBUG_CONNECT          11
  486. #define DEBUG_SYSOP_LOGON      12
  487. #define DEBUG_REMOTE_LOGON     13
  488. #define DEBUG_SUSPEND_LOGON    14
  489. #define DEBUG_LOCAL_LOGON      15
  490. #define DEBUG_LOGOFF_SCRIPT    16
  491.  
  492. #define CONSOLE_PORT 1
  493. #define SERIAL_PORT 2
  494.